{extend name="public:base" /}

{block name="content"}
<div class="page-header">
	<h1>	
		{$breadcrumb1}
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			{$breadcrumb2}
		</small>
	</h1>
</div>	
<div class="page-header">
	<a href="{:url('User/add')}" class="btn btn-primary">新增</a>
</div>		
	
<div class="row">
	<div class="col-xs-12">	
		<div class="table-responsive">
			<table class="table table-striped table-bordered table-hover">
				<thead>
					<tr>											
						<th>用户名</th>
						<th>用户组</th> 
						<th>状态</th> 						
						<th>操作</th>									
					</tr>
				</thead>
				<tbody>
						{volist name="list" id="a" empty="$empty"}
						<tr>							
							<td>{$a.user_name}</td>
							<td>{$a.title}</td>
							<td>
								{switch name="a.status"}
									{case value="1"}<a href='{:url("User/set_status",array("id"=>$a["admin_id"],"status"=>0))}'><span class="btn btn-xs btn-success"><i class="fa fa-check bigger-120"></i></span></a>{/case}
									{case value="0"}<a href='{:url("User/set_status",array("id"=>$a["admin_id"],"status"=>1))}'><span class="btn btn-xs btn-danger"><i class="fa fa-remove bigger-120"></i></span></a>{/case}
								{/switch}								
							</td>							
							<td>
								<a  class="btn btn-xs btn-info" href='{:url("User/edit",array("id"=>$a["admin_id"]))}'>
									<i class="fa fa-edit bigger-120"></i>
								</a> 
								<a class="delete btn btn-xs btn-danger" href='{:url("User/del",array("id"=>$a["admin_id"]))}' >
									<i class="fa fa-trash bigger-120"></i>
								</a>
							</td>							
						</tr>
						{/volist}
						
						<tr>
							<td colspan="20" class="page">{$list->render()}</td>
						</tr>
						<tr>
							<td colspan="20">总计 {$list->total()|default="0"} 个用户</td>
						</tr>
				</tbody>
				
			</table>
		</div>
	</div>
</div>
{/block}
